import { EntityRepository, Repository } from 'typeorm'
import { SmsRecord } from '@/entities/sms/sms.entity'
import { User } from '@/entities/user/user.entity'
import { UserAuth } from '@/entities/user/auth.entity'
import { UserDevices } from '@/entities/user/devices.entity'
import { UserToken } from '@/entities/user/token.entity'
import { UserGeo } from '@/entities/user/geo.entity'
import { GlobalConfig } from '@/entities/global/config.entity'
import { GlobalGeo } from '@/entities/global/geo.entity'
import { GlobalHelp } from '@/entities/global/help.entity'
import { GlobalQueue } from '@/entities/global/queue.entity'
import { Doc } from '@/entities/doc/doc.entity'
import { DocToc } from '@/entities/doc/toc.entity'
import { DocHistory } from '@/entities/doc/doc-history.entity'
import { VersionBranch } from '@/entities/version/branch.entity'
import { Version } from '@/entities/version/version.entity'
import { VersionFlow } from '@/entities/version/flow.entity'
import { VersionRepoEntity } from '@/entities/version/repo.entity'
import { CompanyEntity } from '@/entities/company/company.entity'
import { Project } from '@/entities/project/project.entity'
import { ProjectCompany } from '@/entities/project/project-company.entity'
import { RoleAction } from '@/entities/role/role-action.entity'
import { RoleProject } from '@/entities/role/role-project.entity'

/**
 * @description: 全局库
 */
@EntityRepository(GlobalConfig)
export class GlobalConfigRepo extends Repository<GlobalConfig> {}
@EntityRepository(GlobalGeo)
export class GlobalGeoRepo extends Repository<GlobalGeo> {}
@EntityRepository(GlobalHelp)
export class GlobalHelpRepo extends Repository<GlobalHelp> {}
@EntityRepository(GlobalQueue)
export class GlobalQueueRepo extends Repository<GlobalQueue> {}

/**
 * @description: 短信相关
 */
@EntityRepository(SmsRecord)
export class SmsRecordRepo extends Repository<SmsRecord> {}

/**
 * @description: 用户相关
 */
@EntityRepository(User)
export class UserRepo extends Repository<User> {}
@EntityRepository(UserAuth)
export class UserAuthRepo extends Repository<UserAuth> {}
@EntityRepository(UserDevices)
export class UserDevicesRepo extends Repository<UserDevices> {}
@EntityRepository(UserToken)
export class UserTokenRepo extends Repository<UserToken> {}
@EntityRepository(UserGeo)
export class UserGeoRepo extends Repository<UserGeo> {}

/**
 * @description: 角色权限相关
 */
@EntityRepository(RoleAction)
export class RoleActionRepo extends Repository<RoleAction> {}
@EntityRepository(RoleProject)
export class RoleProjectRepo extends Repository<RoleProject> {}

/**
 * @description: 文档相关
 */
@EntityRepository(Doc)
export class DocRepo extends Repository<Doc> {}
@EntityRepository(DocToc)
export class DocTocRepo extends Repository<DocToc> {}
@EntityRepository(DocHistory)
export class DocHistoryRepo extends Repository<DocHistory> {}

/**
 * @description: 版本相关
 */
@EntityRepository(Version)
export class VersionRepo extends Repository<Version> {}
@EntityRepository(VersionBranch)
export class VersionBranchRepo extends Repository<VersionBranch> {}
@EntityRepository(VersionRepoEntity)
export class VersionRepoRepo extends Repository<VersionRepoEntity> {}
@EntityRepository(VersionFlow)
export class VersionFlowRepo extends Repository<VersionFlow> {}

/**
 * @description: 企业相关
 */
@EntityRepository(CompanyEntity)
export class CompanyRepo extends Repository<CompanyEntity> {}
@EntityRepository(Project)
export class ProjectRepo extends Repository<Project> {}
@EntityRepository(ProjectCompany)
export class ProjectCompanyRepo extends Repository<ProjectCompany> {}
